<script setup>
import Login from '@/views/Login.vue'
import Register from '@/views/Register.vue'
import { ref } from 'vue'
const flag = ref(false);
// 添加切换方法
function changeFlag(){
    flag.value = !flag.value;
}
</script>

<template>
<Login v-if="flag"></Login>
<Register v-else></Register> 
<button class="btu" @click="changeFlag">{{ flag?'没有账号？立即注册':'已有账号？立即登录' }}</button> 
</template>

<style scoped>
.btu{
  font-size: 15px;
  color: #a6a6a6;
  text-align: right;
  background-color: white;
  position: absolute;
  top: 85px;
  right: 265px;
  border: 0px ;
}
</style>
